package org.shangrila.app.sys.eo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the SYS_SERVICE_INFO database table.
 * 
 */
@Entity
@Table(name="SYS_SERVICE_INFO")
@NamedQuery(name="SysServiceInfo.findAll", query="SELECT s FROM SysServiceInfo s")
public class SysServiceInfo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private String cmds;

	private String flag;

	private String ipaddress;

	private String name;

	private String port;

	private String protocol;

	@Column(name="\"STATE\"")
	private String state;

	private String stype;

	//bi-directional many-to-one association to SysMonitorInfo
	@OneToMany(mappedBy="sysServiceInfo")
	private List<SysMonitorInfo> sysMonitorInfos;

	public SysServiceInfo() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCmds() {
		return this.cmds;
	}

	public void setCmds(String cmds) {
		this.cmds = cmds;
	}

	public String getFlag() {
		return this.flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getIpaddress() {
		return this.ipaddress;
	}

	public void setIpaddress(String ipaddress) {
		this.ipaddress = ipaddress;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPort() {
		return this.port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public String getProtocol() {
		return this.protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getStype() {
		return this.stype;
	}

	public void setStype(String stype) {
		this.stype = stype;
	}

	public List<SysMonitorInfo> getSysMonitorInfos() {
		return this.sysMonitorInfos;
	}

	public void setSysMonitorInfos(List<SysMonitorInfo> sysMonitorInfos) {
		this.sysMonitorInfos = sysMonitorInfos;
	}

	public SysMonitorInfo addSysMonitorInfo(SysMonitorInfo sysMonitorInfo) {
		getSysMonitorInfos().add(sysMonitorInfo);
		sysMonitorInfo.setSysServiceInfo(this);

		return sysMonitorInfo;
	}

	public SysMonitorInfo removeSysMonitorInfo(SysMonitorInfo sysMonitorInfo) {
		getSysMonitorInfos().remove(sysMonitorInfo);
		sysMonitorInfo.setSysServiceInfo(null);

		return sysMonitorInfo;
	}

}